#ifndef COPERLOGMANAGER_H
#define COPERLOGMANAGER_H

#include <iostream>
#include <vector>

#include "CommonType.h"

namespace zl {

class COperLogManager
{
public:
    static COperLogManager* Instance();
    static void Release();
    static std::string GeneratedLogID();

    int32_t Init(const std::string& cabinetno, CabinetInfo config);

    OperLog CreateOperLog();
    int32_t CommitOperLog(OperLog& operlog);

    int32_t GetAllOperLogs(
        OperLogVec& vec,
        const std::string& begin_time,
        const std::string& end_time,
        const std::string& phone = "",
//		const int32_t order_status = 0,
//		const int32_t order_type = -1,
        const int32_t lockerno = 0);

    int32_t ConfirmOperLog(const std::string& log_id);
    int32_t GetAllUnconfirmedOperLog(OperLogVec& operlog);

protected:
    explicit COperLogManager() = default;
    ~COperLogManager() = default;

private:
    static COperLogManager*         Instance_;
    static CabinetInfo              Config_;
    static std::string				Cabinet_No_;
};

}

#endif // COPERLOGMANAGER_H
